package com.huaxin.common.Entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/11/25.
 *
 * {"signList":[{"backAddress":"未来之光","backDate":1479971441000,"backDes":"系统管理员11月签退",
 * "backImgUrl":["1.jpg","2.jpg"],"id":6,"inAddress":"未来之光","inDate":1479971441000,
 * "inDes":"系统管理员11月签到","inImgUrl":["1.jpg","2.jpg"],"stationName":"测试站点4"}],"checkState":1}
 */

public class SignHistoryDTO extends BaseDTO implements Parcelable {


    private List<SignListBean> signList;

    public List<SignListBean> getSignList() {
        return signList;
    }

    public void setSignList(List<SignListBean> signList) {
        this.signList = signList;
    }

    public static class SignListBean implements Parcelable {

        /**
         * backImgUrls : [{"id":29,"backImgUrl":"http://10.0.0.54:8082/uploads/signinImg/PWFH4Y/170805045541_51_IMG_20170803_101531.jpg"},{"id":30,"backImgUrl":"http://10.0.0.54:8082/uploads/signinImg/PWFH4Y/170805045541_28_IMG_20170803_082456.jpg"}]
         * inDate : 1501899107000
         * inAddress : 湖北省武汉市洪山区光谷大道
         * stationLng : 114.43123
         * stationLat : 30.509644
         * inLng : 114.431242
         * id : 3
         * inDes : 2222
         * backTypeIds : [{"id":"1","des":"清洁站区"},{"id":"2","des":"常规检查"}]
         * inLat : 30.509247
         * backAddress : 湖北省武汉市洪山区光谷大道
         * backLng : 114.431242
         * backLat : 30.509247
         * stationName : 华北设计院静海县大邱庄
         * backDes : 333
         * backDate : 1501899121000
         * inImgUrls : [{"id":31,"inImgUrl":"http://10.0.0.54:8082/uploads/signinImg/PWFH4Y/170805050825_90_IMG_20170803_101531.jpg"},{"id":32,"inImgUrl":"http://10.0.0.54:8082/uploads/signinImg/PWFH4Y/170805050825_98_IMG_20170803_082456.jpg"}]
         * inTypeIds : [{"id":"1","des":"清洁站区"},{"id":"2","des":"常规检查"},{"id":"3","des":"设备维修"}]
         */

        private long inDate;
        private String                inAddress;
        private double                stationLng;
        private double                stationLat;
        private double                inLng;
        private int                   id;
        private String                inDes;
        private double                inLat;
        private String                backAddress;
        private double                backLng;
        private double                backLat;
        private String                stationName;
        private String                backDes;
        private long                  backDate;
        private List<BackImgUrlsBean> backImgUrls;
        private List<BackTypeIdsBean> backTypeIds;
        private List<InImgUrlsBean>   inImgUrls;
        private List<InTypeIdsBean>   inTypeIds;

        public long getInDate() {
            return inDate;
        }

        public void setInDate(long inDate) {
            this.inDate = inDate;
        }

        public String getInAddress() {
            return inAddress;
        }

        public void setInAddress(String inAddress) {
            this.inAddress = inAddress;
        }

        public double getStationLng() {
            return stationLng;
        }

        public void setStationLng(double stationLng) {
            this.stationLng = stationLng;
        }

        public double getStationLat() {
            return stationLat;
        }

        public void setStationLat(double stationLat) {
            this.stationLat = stationLat;
        }

        public double getInLng() {
            return inLng;
        }

        public void setInLng(double inLng) {
            this.inLng = inLng;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getInDes() {
            return inDes;
        }

        public void setInDes(String inDes) {
            this.inDes = inDes;
        }

        public double getInLat() {
            return inLat;
        }

        public void setInLat(double inLat) {
            this.inLat = inLat;
        }

        public String getBackAddress() {
            return backAddress;
        }

        public void setBackAddress(String backAddress) {
            this.backAddress = backAddress;
        }

        public double getBackLng() {
            return backLng;
        }

        public void setBackLng(double backLng) {
            this.backLng = backLng;
        }

        public double getBackLat() {
            return backLat;
        }

        public void setBackLat(double backLat) {
            this.backLat = backLat;
        }

        public String getStationName() {
            return stationName;
        }

        public void setStationName(String stationName) {
            this.stationName = stationName;
        }

        public String getBackDes() {
            return backDes;
        }

        public void setBackDes(String backDes) {
            this.backDes = backDes;
        }

        public long getBackDate() {
            return backDate;
        }

        public void setBackDate(long backDate) {
            this.backDate = backDate;
        }

        public List<BackImgUrlsBean> getBackImgUrls() {
            return backImgUrls;
        }

        public void setBackImgUrls(List<BackImgUrlsBean> backImgUrls) {
            this.backImgUrls = backImgUrls;
        }

        public List<BackTypeIdsBean> getBackTypeIds() {
            return backTypeIds;
        }

        public void setBackTypeIds(List<BackTypeIdsBean> backTypeIds) {
            this.backTypeIds = backTypeIds;
        }

        public List<InImgUrlsBean> getInImgUrls() {
            return inImgUrls;
        }

        public void setInImgUrls(List<InImgUrlsBean> inImgUrls) {
            this.inImgUrls = inImgUrls;
        }

        public List<InTypeIdsBean> getInTypeIds() {
            return inTypeIds;
        }

        public void setInTypeIds(List<InTypeIdsBean> inTypeIds) {
            this.inTypeIds = inTypeIds;
        }

        public static class BackImgUrlsBean implements Parcelable {

            /**
             * id : 29
             * backImgUrl : http://10.0.0.54:8082/uploads/signinImg/PWFH4Y/170805045541_51_IMG_20170803_101531.jpg
             */

            private int id;
            private String backImgUrl;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getBackImgUrl() {
                return backImgUrl;
            }

            public void setBackImgUrl(String backImgUrl) {
                this.backImgUrl = backImgUrl;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.id);
                dest.writeString(this.backImgUrl);
            }

            public BackImgUrlsBean() {
            }

            protected BackImgUrlsBean(Parcel in) {
                this.id = in.readInt();
                this.backImgUrl = in.readString();
            }

            public static final Creator<BackImgUrlsBean> CREATOR = new Creator<BackImgUrlsBean>() {
                @Override
                public BackImgUrlsBean createFromParcel(Parcel source) {
                    return new BackImgUrlsBean(source);
                }

                @Override
                public BackImgUrlsBean[] newArray(int size) {
                    return new BackImgUrlsBean[size];
                }
            };
        }

        public static class BackTypeIdsBean implements Parcelable {
            /**
             * id : 1
             * des : 清洁站区
             */

            private String id;
            private String des;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getDes() {
                return des;
            }

            public void setDes(String des) {
                this.des = des;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.id);
                dest.writeString(this.des);
            }

            public BackTypeIdsBean() {
            }

            protected BackTypeIdsBean(Parcel in) {
                this.id = in.readString();
                this.des = in.readString();
            }

            public static final Creator<BackTypeIdsBean> CREATOR = new Creator<BackTypeIdsBean>() {
                @Override
                public BackTypeIdsBean createFromParcel(Parcel source) {
                    return new BackTypeIdsBean(source);
                }

                @Override
                public BackTypeIdsBean[] newArray(int size) {
                    return new BackTypeIdsBean[size];
                }
            };
        }

        public static class InImgUrlsBean implements Parcelable {
            /**
             * id : 31
             * inImgUrl : http://10.0.0.54:8082/uploads/signinImg/PWFH4Y/170805050825_90_IMG_20170803_101531.jpg
             */

            private int id;
            private String inImgUrl;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getInImgUrl() {
                return inImgUrl;
            }

            public void setInImgUrl(String inImgUrl) {
                this.inImgUrl = inImgUrl;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.id);
                dest.writeString(this.inImgUrl);
            }

            public InImgUrlsBean() {
            }

            protected InImgUrlsBean(Parcel in) {
                this.id = in.readInt();
                this.inImgUrl = in.readString();
            }

            public static final Creator<InImgUrlsBean> CREATOR = new Creator<InImgUrlsBean>() {
                @Override
                public InImgUrlsBean createFromParcel(Parcel source) {
                    return new InImgUrlsBean(source);
                }

                @Override
                public InImgUrlsBean[] newArray(int size) {
                    return new InImgUrlsBean[size];
                }
            };
        }

        public static class InTypeIdsBean implements Parcelable {
            /**
             * id : 1
             * des : 清洁站区
             */

            private String id;
            private String des;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getDes() {
                return des;
            }

            public void setDes(String des) {
                this.des = des;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.id);
                dest.writeString(this.des);
            }

            public InTypeIdsBean() {
            }

            protected InTypeIdsBean(Parcel in) {
                this.id = in.readString();
                this.des = in.readString();
            }

            public static final Creator<InTypeIdsBean> CREATOR = new Creator<InTypeIdsBean>() {
                @Override
                public InTypeIdsBean createFromParcel(Parcel source) {
                    return new InTypeIdsBean(source);
                }

                @Override
                public InTypeIdsBean[] newArray(int size) {
                    return new InTypeIdsBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeLong(this.inDate);
            dest.writeString(this.inAddress);
            dest.writeDouble(this.stationLng);
            dest.writeDouble(this.stationLat);
            dest.writeDouble(this.inLng);
            dest.writeInt(this.id);
            dest.writeString(this.inDes);
            dest.writeDouble(this.inLat);
            dest.writeString(this.backAddress);
            dest.writeDouble(this.backLng);
            dest.writeDouble(this.backLat);
            dest.writeString(this.stationName);
            dest.writeString(this.backDes);
            dest.writeLong(this.backDate);
            dest.writeTypedList(this.backImgUrls);
            dest.writeTypedList(this.backTypeIds);
            dest.writeTypedList(this.inImgUrls);
            dest.writeTypedList(this.inTypeIds);
        }

        public SignListBean() {
        }

        protected SignListBean(Parcel in) {
            this.inDate = in.readLong();
            this.inAddress = in.readString();
            this.stationLng = in.readDouble();
            this.stationLat = in.readDouble();
            this.inLng = in.readDouble();
            this.id = in.readInt();
            this.inDes = in.readString();
            this.inLat = in.readDouble();
            this.backAddress = in.readString();
            this.backLng = in.readDouble();
            this.backLat = in.readDouble();
            this.stationName = in.readString();
            this.backDes = in.readString();
            this.backDate = in.readLong();
            this.backImgUrls = in.createTypedArrayList(BackImgUrlsBean.CREATOR);
            this.backTypeIds = in.createTypedArrayList(BackTypeIdsBean.CREATOR);
            this.inImgUrls = in.createTypedArrayList(InImgUrlsBean.CREATOR);
            this.inTypeIds = in.createTypedArrayList(InTypeIdsBean.CREATOR);
        }

        public static final Creator<SignListBean> CREATOR = new Creator<SignListBean>() {
            @Override
            public SignListBean createFromParcel(Parcel source) {
                return new SignListBean(source);
            }

            @Override
            public SignListBean[] newArray(int size) {
                return new SignListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeList(this.signList);
    }

    public SignHistoryDTO() {
    }

    protected SignHistoryDTO(Parcel in) {
        this.signList = new ArrayList<SignListBean>();
        in.readList(this.signList, SignListBean.class.getClassLoader());
    }

    public static final Creator<SignHistoryDTO> CREATOR = new Creator<SignHistoryDTO>() {
        @Override
        public SignHistoryDTO createFromParcel(Parcel source) {
            return new SignHistoryDTO(source);
        }

        @Override
        public SignHistoryDTO[] newArray(int size) {
            return new SignHistoryDTO[size];
        }
    };
}
